<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title>新PMS项目</title>
	<script type="text/javascript" src="bootstrap/jquery.js"></script>
	<link rel="stylesheet" type="text/css" href="bootstrap/bootstrap.min.css" />
	<style type="text/css">
		body{
			background-image:url("bootstrap/backgroundimg.png");
			font-family:"微软雅黑";
		}
		.div1{
			margin-left:20px;
			width:500px;
			height:auto;
		}
		.tr1{
			background-color:grey;
			color:white;
		}
		td{
			padding-left:30px;
			font-size:18px;
		}
		#error{
			color:red;
		}
		.div4{
			width:200px;
			height:200px;
			margin-left:520px;
			padding-left:10px;
			border:1px solid black;
			float:left;
			position:relative;
			top:-370px;
			padding-top:5px;
			background-color:grey;
			font-family:"微软雅黑";
		}
		.div4 h2{
			padding-top:20px;
		}
		hr{
			border:1px solid black;
			width:180px;
		}
		li{
			font-size:16px;
		}
		a{
			color:white;
		}
	</style>
</head>
<body>
	<div class="div1">
		<div class="div2">
			<form action="prod.jspx?method=msg" method="post" id="myform">
				<table border="1" width="500" height="200">
					<tr height="40" class="tr1">
						<td>你想说点什么...</td>
					</tr>
					<tr>
						<td>
							<span id="error"></span>
							<textarea name="msg" id="textarea01" style="width:415px" rows="4"></textarea><!--要发布的内容，需要存数据库，要商量着命名-->
							<br/>
							<input type="button" id="btn" value="发布" class="btn btn-primary" />
						</td>
					</tr>
				</table>
			</form>
		<div class="div3">
				<table border="1" width="500">
					<tr height="40" class="tr1">
						<td>信息流.</td>
					</tr>
					<c:forEach items="${mlist }" var="m">
					<tr>
						<td>
							${m.mcontent}<br/>
							
							发布时间：${m.mctime }
							<br/><br/>
						</td>
					</tr>
					</c:forEach>
					<c:forEach items="${dlist }" var="d">
					<tr>
						<td>
							${d.eid }发布一条新资料<br/>
							
							发布时间：${d.dctime }
							<br/><br/>
						</td>
					</tr>
					</c:forEach>
					<c:forEach items="${ftlist }" var="ft">
					<tr>
						<td>
							${ft.eid }创建一个新文件夹<br/>
							
							发布时间：${f.ftctime }
							<br/><br/>
						</td>
					</tr>
					</c:forEach>
					<c:forEach items="${glist }" var="g">
					<tr>
						<td>
							${g.eid }创建了一个目标<br/>
							
							发布时间：${g.gctime }
							<br/><br/>
						</td>
					</tr>
					</c:forEach>
					<c:forEach items="${ilist }" var="i">
					<tr>
						<td>
							${i.eid }发表了一个想法<br/>
							
							发布时间：${i.ictime }
							<br/><br/>
						</td>
					</tr>
					</c:forEach>
					<c:forEach items="${pelist }" var="pe">
					<tr>
						<td>
							${pe.eid }创建一个新工程<br/>
							<br/><br/>
						</td>
					</tr>
					</c:forEach>
				</table>
	</div>
	<div class="div4">
		<h2><a href="prod.jspx?method=task">我的任务</a></h2>
		<hr />
		<ul>
			<li><a href="prod.jspx?method=task">任务一</a></li><!--需要转到任务的界面-->
			<li><a href="prod.jspx?method=task">任务二</a></li>
			<li><a href="prod.jspx?method=task">任务三</a></li>
		</ul>
	</div>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#btn").click(function(){
				var textarea = $("textarea01").val();
				if(textarea == null || "" == textarea){
					$("#myform").submit();
				}else{
					$("#error").html("内容不能为空");
					return;
				}
			});
		});
	</script>
</body>
</html>